<?php ob_start();
session_start(); 
include "./config/koneksi.php"; 
$user = $_POST['username']; 
$pass = $_POST['password']; 
$login = "SELECT * FROM LOGIN WHERE ID_USER = '$user'"; 
$parse = ociparse($conn,$login);
ociexecute($parse);
while($hasil = oci_fetch_array($parse))
{
	$username=$hasil['ID_USER'];
	$password=$hasil['PASSWD'];
}
	if($username == "petugas" and $password == "123")
	{ 
//session_start(); 
	$_SESSION["sesi_admin"] = $hasil["ID_USER"]; 
	header("location:home.php"); 
	exit(); 
	}
	if($username == "manager" and $password == "123")
	{ 
//session_start(); 
	$_SESSION["sesi_admin"] = $hasil["USERNAME"]; 
	header("location:laporan.php"); 
	exit(); 
	}
	else
	{ 
	header("location:laporan.php"); 
	exit(); 
	}
ob_flush();
oci_close($conn);
?> 